package com.ruoyi.system.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.ModuleTreemainMapper;
import com.ruoyi.system.domain.ModuleTreemain;
import com.ruoyi.system.service.IModuleTreemainService;

/**
 * 档案类别Service业务层处理
 * 
 * @author  jiang
 * @date 2023-09-04
 */
@Service
public class ModuleTreemainServiceImpl implements IModuleTreemainService 
{
    @Autowired
    private ModuleTreemainMapper moduleTreemainMapper;

    /**
     * 查询档案类别
     * 
     * @param id 档案类别主键
     * @return 档案类别
     */
    @Override
    public ModuleTreemain selectModuleTreemainById(String id)
    {
        return moduleTreemainMapper.selectModuleTreemainById(id);
    }

    /**
     * 查询档案类别列表
     * 
     * @param moduleTreemain 档案类别
     * @return 档案类别
     */
    @Override
    public List<ModuleTreemain> selectModuleTreemainList(ModuleTreemain moduleTreemain)
    {
        return moduleTreemainMapper.selectModuleTreemainList(moduleTreemain);
    }

    /**
     * 新增档案类别
     * 
     * @param moduleTreemain 档案类别
     * @return 结果
     */
    @Override
    public int insertModuleTreemain(ModuleTreemain moduleTreemain)
    {
        return moduleTreemainMapper.insertModuleTreemain(moduleTreemain);
    }

    /**
     * 修改档案类别
     * 
     * @param moduleTreemain 档案类别
     * @return 结果
     */
    @Override
    public int updateModuleTreemain(ModuleTreemain moduleTreemain)
    {
        return moduleTreemainMapper.updateModuleTreemain(moduleTreemain);
    }

    /**
     * 批量删除档案类别
     * 
     * @param ids 需要删除的档案类别主键
     * @return 结果
     */
    @Override
    public int deleteModuleTreemainByIds(String[] ids)
    {
        return moduleTreemainMapper.deleteModuleTreemainByIds(ids);
    }

    /**
     * 删除档案类别信息
     * 
     * @param id 档案类别主键
     * @return 结果
     */
    @Override
    public int deleteModuleTreemainById(String id)
    {
        return moduleTreemainMapper.deleteModuleTreemainById(id);
    }

    @Override
    public List<ModuleTreemain> getFirstClass() {
        return moduleTreemainMapper.getFirstClass();
    }

    @Override
    public long selectMaxIndexId(){
        return moduleTreemainMapper.selectMaxIndexId();
    }
}
